import React from 'react';
import { connect } from 'dva';
import {Form, Icon, Input, Button} from 'antd';

const FormItem = Form.Item;

class EditPassword extends React.Component{
  constructor(props){
    super(props)
  }
  render(){
    return (
    	<Form horizontal>
    		<FormItem
          label="用户名："
          labelCol={{ span: 6 }}
          wrapperCol={{ span: 6 }}>
          <Input type="text"  placeholder="请输入用户名" />
        </FormItem>
    		<FormItem
          label="密码："
          labelCol={{ span: 6 }}
          wrapperCol={{ span: 6 }}>
          <Input type="password"  placeholder="请输入密码" />
        </FormItem>
    		<FormItem
          label="确认密码："
          labelCol={{ span: 6 }}
          wrapperCol={{ span: 6 }}>
          <Input type="password"  placeholder="确认密码" />
        </FormItem>
    		<FormItem
          label="备注："
          labelCol={{ span: 6 }}
          wrapperCol={{ span: 10 }}>
          <Input type="textarea" rows={4}  placeholder="备注" />
        </FormItem>
    		<FormItem wrapperCol={{offset: 6}}>
          <Button type="default" htmlType="submit" size="large">提交</Button>
          <Button type="default" htmlType="reset" size="large">重置</Button>
        </FormItem>
    	</Form>
    )
  }
  componentDidMount(){
    const breadcrumbData = {
      breadcrumb:[
      	{
      		name:'首页',
      		path:'/'
      	},
        {
          name:'修改密码'
        }
      ]
    };
    this.props.dispatch({
      type:'common/changeBreadcrumb',
      payload:breadcrumbData
    })
  }
}

const CommonFormForm = Form.create()(EditPassword);

function mapStateToProps({ common }) {
  return {common};
}
export default connect(mapStateToProps)(EditPassword);